package com.zhonghui.modlules.product.eshopDomain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;
import com.zhonghui.common.eshopDomain.ShopUser;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@TableName("store_product_reply")
public class StoreProductReply extends BaseDomain {
    @TableId
    private Long id;
    private Long uid;
    private Long oid;
    @TableField("`unique`")
    private String unique;
    private Long productId;
    private String replyType;
    private Integer productScore;
    private Integer serviceScore;
    private String comment;
    private String pics;
    @NotBlank(
            message = "回复内容不能为空"
    )
    private String merchantReplyContent;
    private Date merchantReplyTime;
    private Integer isReply;
    @TableField(
            exist = false
    )
    private StoreProduct storeProduct;
    @TableField(
            exist = false
    )
    private ShopUser user;

    public void copy(StoreProductReply source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }

    public static StoreProductReply.StoreProductReplyBuilder builder() {
        return new StoreProductReply.StoreProductReplyBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public Long getUid() {
        return this.uid;
    }

    public Long getOid() {
        return this.oid;
    }

    public String getUnique() {
        return this.unique;
    }

    public Long getProductId() {
        return this.productId;
    }

    public String getReplyType() {
        return this.replyType;
    }

    public Integer getProductScore() {
        return this.productScore;
    }

    public Integer getServiceScore() {
        return this.serviceScore;
    }

    public String getComment() {
        return this.comment;
    }

    public String getPics() {
        return this.pics;
    }

    public String getMerchantReplyContent() {
        return this.merchantReplyContent;
    }

    public Date getMerchantReplyTime() {
        return this.merchantReplyTime;
    }

    public Integer getIsReply() {
        return this.isReply;
    }

    public StoreProduct getStoreProduct() {
        return this.storeProduct;
    }

    public ShopUser getUser() {
        return this.user;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setUid(final Long uid) {
        this.uid = uid;
    }

    public void setOid(final Long oid) {
        this.oid = oid;
    }

    public void setUnique(final String unique) {
        this.unique = unique;
    }

    public void setProductId(final Long productId) {
        this.productId = productId;
    }

    public void setReplyType(final String replyType) {
        this.replyType = replyType;
    }

    public void setProductScore(final Integer productScore) {
        this.productScore = productScore;
    }

    public void setServiceScore(final Integer serviceScore) {
        this.serviceScore = serviceScore;
    }

    public void setComment(final String comment) {
        this.comment = comment;
    }

    public void setPics(final String pics) {
        this.pics = pics;
    }

    public void setMerchantReplyContent(final String merchantReplyContent) {
        this.merchantReplyContent = merchantReplyContent;
    }

    public void setMerchantReplyTime(final Date merchantReplyTime) {
        this.merchantReplyTime = merchantReplyTime;
    }

    public void setIsReply(final Integer isReply) {
        this.isReply = isReply;
    }

    public void setStoreProduct(final StoreProduct storeProduct) {
        this.storeProduct = storeProduct;
    }

    public void setUser(final ShopUser user) {
        this.user = user;
    }

    public String toString() {
        return "StoreProductReply(id=" + this.getId() + ", uid=" + this.getUid() + ", oid=" + this.getOid() + ", unique=" + this.getUnique() + ", productId=" + this.getProductId() + ", replyType=" + this.getReplyType() + ", productScore=" + this.getProductScore() + ", serviceScore=" + this.getServiceScore() + ", comment=" + this.getComment() + ", pics=" + this.getPics() + ", merchantReplyContent=" + this.getMerchantReplyContent() + ", merchantReplyTime=" + this.getMerchantReplyTime() + ", isReply=" + this.getIsReply() + ", storeProduct=" + this.getStoreProduct() + ", user=" + this.getUser() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof StoreProductReply)) {
            return false;
        } else {
            StoreProductReply other = (StoreProductReply)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                label193: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label193;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label193;
                    }

                    return false;
                }

                Object this$uid = this.getUid();
                Object other$uid = other.getUid();
                if (this$uid == null) {
                    if (other$uid != null) {
                        return false;
                    }
                } else if (!this$uid.equals(other$uid)) {
                    return false;
                }

                Object this$oid = this.getOid();
                Object other$oid = other.getOid();
                if (this$oid == null) {
                    if (other$oid != null) {
                        return false;
                    }
                } else if (!this$oid.equals(other$oid)) {
                    return false;
                }

                label172: {
                    Object this$productId = this.getProductId();
                    Object other$productId = other.getProductId();
                    if (this$productId == null) {
                        if (other$productId == null) {
                            break label172;
                        }
                    } else if (this$productId.equals(other$productId)) {
                        break label172;
                    }

                    return false;
                }

                Object this$productScore = this.getProductScore();
                Object other$productScore = other.getProductScore();
                if (this$productScore == null) {
                    if (other$productScore != null) {
                        return false;
                    }
                } else if (!this$productScore.equals(other$productScore)) {
                    return false;
                }

                Object this$serviceScore = this.getServiceScore();
                Object other$serviceScore = other.getServiceScore();
                if (this$serviceScore == null) {
                    if (other$serviceScore != null) {
                        return false;
                    }
                } else if (!this$serviceScore.equals(other$serviceScore)) {
                    return false;
                }

                label151: {
                    Object this$isReply = this.getIsReply();
                    Object other$isReply = other.getIsReply();
                    if (this$isReply == null) {
                        if (other$isReply == null) {
                            break label151;
                        }
                    } else if (this$isReply.equals(other$isReply)) {
                        break label151;
                    }

                    return false;
                }

                Object this$unique = this.getUnique();
                Object other$unique = other.getUnique();
                if (this$unique == null) {
                    if (other$unique != null) {
                        return false;
                    }
                } else if (!this$unique.equals(other$unique)) {
                    return false;
                }

                label137: {
                    Object this$replyType = this.getReplyType();
                    Object other$replyType = other.getReplyType();
                    if (this$replyType == null) {
                        if (other$replyType == null) {
                            break label137;
                        }
                    } else if (this$replyType.equals(other$replyType)) {
                        break label137;
                    }

                    return false;
                }

                Object this$comment = this.getComment();
                Object other$comment = other.getComment();
                if (this$comment == null) {
                    if (other$comment != null) {
                        return false;
                    }
                } else if (!this$comment.equals(other$comment)) {
                    return false;
                }

                label123: {
                    Object this$pics = this.getPics();
                    Object other$pics = other.getPics();
                    if (this$pics == null) {
                        if (other$pics == null) {
                            break label123;
                        }
                    } else if (this$pics.equals(other$pics)) {
                        break label123;
                    }

                    return false;
                }

                Object this$merchantReplyContent = this.getMerchantReplyContent();
                Object other$merchantReplyContent = other.getMerchantReplyContent();
                if (this$merchantReplyContent == null) {
                    if (other$merchantReplyContent != null) {
                        return false;
                    }
                } else if (!this$merchantReplyContent.equals(other$merchantReplyContent)) {
                    return false;
                }

                label109: {
                    Object this$merchantReplyTime = this.getMerchantReplyTime();
                    Object other$merchantReplyTime = other.getMerchantReplyTime();
                    if (this$merchantReplyTime == null) {
                        if (other$merchantReplyTime == null) {
                            break label109;
                        }
                    } else if (this$merchantReplyTime.equals(other$merchantReplyTime)) {
                        break label109;
                    }

                    return false;
                }

                label102: {
                    Object this$storeProduct = this.getStoreProduct();
                    Object other$storeProduct = other.getStoreProduct();
                    if (this$storeProduct == null) {
                        if (other$storeProduct == null) {
                            break label102;
                        }
                    } else if (this$storeProduct.equals(other$storeProduct)) {
                        break label102;
                    }

                    return false;
                }

                Object this$user = this.getUser();
                Object other$user = other.getUser();
                if (this$user == null) {
                    if (other$user != null) {
                        return false;
                    }
                } else if (!this$user.equals(other$user)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof StoreProductReply;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = super.hashCode();
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $uid = this.getUid();
        result = result * 59 + ($uid == null ? 43 : $uid.hashCode());
        Object $oid = this.getOid();
        result = result * 59 + ($oid == null ? 43 : $oid.hashCode());
        Object $productId = this.getProductId();
        result = result * 59 + ($productId == null ? 43 : $productId.hashCode());
        Object $productScore = this.getProductScore();
        result = result * 59 + ($productScore == null ? 43 : $productScore.hashCode());
        Object $serviceScore = this.getServiceScore();
        result = result * 59 + ($serviceScore == null ? 43 : $serviceScore.hashCode());
        Object $isReply = this.getIsReply();
        result = result * 59 + ($isReply == null ? 43 : $isReply.hashCode());
        Object $unique = this.getUnique();
        result = result * 59 + ($unique == null ? 43 : $unique.hashCode());
        Object $replyType = this.getReplyType();
        result = result * 59 + ($replyType == null ? 43 : $replyType.hashCode());
        Object $comment = this.getComment();
        result = result * 59 + ($comment == null ? 43 : $comment.hashCode());
        Object $pics = this.getPics();
        result = result * 59 + ($pics == null ? 43 : $pics.hashCode());
        Object $merchantReplyContent = this.getMerchantReplyContent();
        result = result * 59 + ($merchantReplyContent == null ? 43 : $merchantReplyContent.hashCode());
        Object $merchantReplyTime = this.getMerchantReplyTime();
        result = result * 59 + ($merchantReplyTime == null ? 43 : $merchantReplyTime.hashCode());
        Object $storeProduct = this.getStoreProduct();
        result = result * 59 + ($storeProduct == null ? 43 : $storeProduct.hashCode());
        Object $user = this.getUser();
        result = result * 59 + ($user == null ? 43 : $user.hashCode());
        return result;
    }

    public StoreProductReply(final Long id, final Long uid, final Long oid, final String unique, final Long productId, final String replyType, final Integer productScore, final Integer serviceScore, final String comment, final String pics, final String merchantReplyContent, final Date merchantReplyTime, final Integer isReply, final StoreProduct storeProduct, final ShopUser user) {
        this.id = id;
        this.uid = uid;
        this.oid = oid;
        this.unique = unique;
        this.productId = productId;
        this.replyType = replyType;
        this.productScore = productScore;
        this.serviceScore = serviceScore;
        this.comment = comment;
        this.pics = pics;
        this.merchantReplyContent = merchantReplyContent;
        this.merchantReplyTime = merchantReplyTime;
        this.isReply = isReply;
        this.storeProduct = storeProduct;
        this.user = user;
    }

    public StoreProductReply() {
    }

    public static class StoreProductReplyBuilder {
        private Long id;
        private Long uid;
        private Long oid;
        private String unique;
        private Long productId;
        private String replyType;
        private Integer productScore;
        private Integer serviceScore;
        private String comment;
        private String pics;
        private String merchantReplyContent;
        private Date merchantReplyTime;
        private Integer isReply;
        private StoreProduct storeProduct;
        private ShopUser user;

        StoreProductReplyBuilder() {
        }

        public StoreProductReply.StoreProductReplyBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder oid(final Long oid) {
            this.oid = oid;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder unique(final String unique) {
            this.unique = unique;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder productId(final Long productId) {
            this.productId = productId;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder replyType(final String replyType) {
            this.replyType = replyType;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder productScore(final Integer productScore) {
            this.productScore = productScore;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder serviceScore(final Integer serviceScore) {
            this.serviceScore = serviceScore;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder comment(final String comment) {
            this.comment = comment;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder pics(final String pics) {
            this.pics = pics;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder merchantReplyContent(final String merchantReplyContent) {
            this.merchantReplyContent = merchantReplyContent;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder merchantReplyTime(final Date merchantReplyTime) {
            this.merchantReplyTime = merchantReplyTime;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder isReply(final Integer isReply) {
            this.isReply = isReply;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder storeProduct(final StoreProduct storeProduct) {
            this.storeProduct = storeProduct;
            return this;
        }

        public StoreProductReply.StoreProductReplyBuilder user(final ShopUser user) {
            this.user = user;
            return this;
        }

        public StoreProductReply build() {
            return new StoreProductReply(this.id, this.uid, this.oid, this.unique, this.productId, this.replyType, this.productScore, this.serviceScore, this.comment, this.pics, this.merchantReplyContent, this.merchantReplyTime, this.isReply, this.storeProduct, this.user);
        }

        public String toString() {
            return "StoreProductReply.StoreProductReplyBuilder(id=" + this.id + ", uid=" + this.uid + ", oid=" + this.oid + ", unique=" + this.unique + ", productId=" + this.productId + ", replyType=" + this.replyType + ", productScore=" + this.productScore + ", serviceScore=" + this.serviceScore + ", comment=" + this.comment + ", pics=" + this.pics + ", merchantReplyContent=" + this.merchantReplyContent + ", merchantReplyTime=" + this.merchantReplyTime + ", isReply=" + this.isReply + ", storeProduct=" + this.storeProduct + ", user=" + this.user + ")";
        }
    }
}

